require 'macos/cocoa_logger'
require 'osx/cocoa'

describe CocoaLogger do
  before(:each) do
    @log = CocoaLogger.new
  end
  
  it "should call NSLog on #write" do
    OSX.should_receive(:NSLog).once.with("Hello, world!")
    @log.write("Hello, world!")
  end
  
  it "should respond to #close" do
    @log.close.should == true
  end
end